﻿using System;
using System.Collections.Generic;
using System.Text;
using DTN.Core.Utilities;
using System.Data.SqlClient;
using System.Data;
namespace com.dtn.deals
{
	public class tbl_Conpon 
	{

        /*
           [conponID] [int] IDENTITY(1,1) NOT NULL,
           [conponCode] [varchar](20) NULL,
           [conponName] [nvarchar](200) NULL,
           [proID] [int] NULL,
           [catID] [int] NULL,
           [partnerID] [int] NULL,
           [sale] [nvarchar](100) NULL,
           [cDate] [datetime] NULL,
           [sDateDeal] [datetime] NULL,
           [eDateDeal] [datetime] NULL,
           [sDateDeal_s] [datetime] NULL,
           [eDateDeal_s] [datetime] NULL,
        
       */


		private System.Int32 _ID;
		public System.Int32 ID
		{
			get { return this._ID; }		
			set { this._ID = value; }
		}
        private System.String _conponCode;
        public System.String conponCode
        {
            get
            {
                return this._conponCode;
            }
            set {
                this._conponCode = value;
            
            }
        }

        private System.String _conponName;
        public System.String conponName
        {
            get
            {
                return this._conponName;
            }
            set
            {
                this._conponName = value;

            }
        }

        private System.Int32 _proId;
		public System.Int32 proId
		{
			get { return this._proId; }		
			set { this._proId = value; }
		}

        private System.Int32 _partnerId;
        public System.Int32 partnerId
        {
            get { return this._partnerId; }
            set { this._partnerId = value; }
        }


        private System.Int32 _cateID;

        public System.Int32 CateID
        {
            get { return _cateID; }
            set { _cateID = value; }
        }

         private System.String _Sale;
        public System.String Sale
        {
            get
            {
                return this._Sale ;
            }
            set
            {
                this._Sale  = value;

            }
        }

	
		private System.DateTime _cDate;
		public System.DateTime cDate
		{
			get { return this._cDate; }		
			set { this._cDate = value; }
		}
		private System.DateTime _startDate;
		public System.DateTime startDate
		{
			get { return this._startDate; }		
			set { this._startDate = value; }
		}
		private System.DateTime _endDate;
		public System.DateTime endDate
		{
			get { return this._endDate; }		
			set { this._endDate = value; }
		}


        private System.DateTime _startDate_s;
        public System.DateTime startDate_s
        {
            get { return this._startDate_s; }
            set { this._startDate_s = value; }
        }
        private System.DateTime _endDate_s;
        public System.DateTime endDate_s
        {
            get { return this._endDate_s; }
            set { this._endDate_s = value; }
        }
	

        public tbl_Conpon()
        {
        }

        public tbl_Conpon(DataRow infodr)
		{
            ID = ConvertUtility.ToInt32(infodr["conponID"]);
            conponCode = ConvertUtility.ToString(infodr["conponCode"]);
            conponName = ConvertUtility.ToString(infodr["conponName"]);
            CateID = ConvertUtility.ToInt32(infodr["cateId"]);
            proId = ConvertUtility.ToInt32(infodr["proId"]);
            partnerId = ConvertUtility.ToInt32(infodr["partnerId"]);
            Sale = ConvertUtility.ToString(infodr["sale"]);
            cDate = ConvertUtility.ToDateTime(infodr["cDate"]);
            startDate = ConvertUtility.ToDateTime(infodr["sDateDeal"]);
            endDate = ConvertUtility.ToDateTime(infodr["eDateDeal"]);
            startDate_s = ConvertUtility.ToDateTime(infodr["sDateDeal_s"]);
            endDate_s = ConvertUtility.ToDateTime(infodr["eDateDeal_s"]);
		}
        public tbl_Conpon(SqlDataReader dr)
		{
            ID = ConvertUtility.ToInt32(dr["conponID"]);
            conponCode = ConvertUtility.ToString(dr["conponCode"]);
            conponName = ConvertUtility.ToString(dr["conponName"]);
            CateID = ConvertUtility.ToInt32(dr["cateId"]);
            proId = ConvertUtility.ToInt32(dr["proId"]);
            partnerId = ConvertUtility.ToInt32(dr["partnerId"]);
            Sale = ConvertUtility.ToString(dr["sale"]);
            cDate = ConvertUtility.ToDateTime(dr["cDate"]);
            startDate = ConvertUtility.ToDateTime(dr["sDateDeal"]);
            endDate = ConvertUtility.ToDateTime(dr["eDateDeal"]);
            startDate_s = ConvertUtility.ToDateTime(dr["sDateDeal_s"]);
            endDate_s = ConvertUtility.ToDateTime(dr["eDateDeal_s"]);
		}
        //
	}
}
